<!DOCTYPE html>
<title>Test window.prompt</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/utils.js"></script>
<script src="resources/utils.js"></script>

<body>
  <script>
    promise_test(async () => {
      const window_prompt_key = stringToStashKey("window.prompt");

      attachFencedFrame("resources/window-prompt-inner.https.html");

      // Get the result for the top-level fenced frame.
      const fenced_frame_result = await nextValueFromServer(window_prompt_key);
      assert_equals(fenced_frame_result, "pass", "The fenced frame failed to open a prompt.");
    }, "window.prompt");
  </script>
</body>
